#include<bits/stdc++.h>
using namespace std;
int main (){
freopen("color.in","r",stdin);
freopen("color.in","w",stdout);
cin>>"3 /n";
cin>>"3 /n";
cin>>"1 2 1 /n";
cin>>"4 /n";
cin>>"1 2 3 4 /n";
cin>>"8 /n";
cin>>"3 5 2 5 1 2 1 4 /n";
cout<<1 /n;
cout<<0 /n;
cout<<8 /n;
return 0;
}
